#!/bin/bash -e

if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
    echo "Illegal number of parameters"
    exit 1
fi

TAG=$1
DRY_RUN=""
[ "$#" -eq 2 ] && DRY_RUN=$2

./build_discuz $TAG $DRY_RUN
./build_framework $TAG $DRY_RUN
./build_vendor $TAG $DRY_RUN
./build_docker $TAG $DRY_RUN